/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cxhd.pacs.actor;

import akka.actor.ActorRef;
import akka.actor.UntypedActor;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;
import java.util.Map;

/**
 *
 * @author Administrator
 */
public class SavePatInfoActor extends UntypedActor {

    @Override
    public void onReceive(Object o) throws Exception {
        Map<String,String>info = (Map<String,String>) o;
        System.out.println("save info========================"+info);
        saveInfo(info);

    }
    
    public void saveInfo( Map<String,String>info){
     Record re = new Record();
     for(String key:info.keySet()){
       re.set(key, info.get(key));
     }
     Db.save("pat_data", re);
    }

}
